﻿import re
from BeautifulSoup import BeautifulSoup

html = '<div id="domian_url"><a href="1e.com" titel="你好">sd.com</a></div><div id="domian_url"><a href="1e.com">033.com</a></div>'

htmls = '<div class="domainurl"><a href="http://whois.chinaz.com/d54.net" id="domain_8" target="_blank" title="æ¥ç d54.net åå??Whoisä¿¡æ?¯">d54.net</a></div>'
items = BeautifulSoup(htmls).findAll(['a'])
print items
for item in items:
    val = re.match('<a.*?>([\s\S]*?)<\/a>', str(item))
    print val.group(1)
